//
//  MGDemoViewController.swift
//  微博
//
//  Created by 陈明光 on 2019/11/6.
//  Copyright © 2019 陈明光. All rights reserved.
//

import UIKit

class MGDemoViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = .blue
        //设置标题
        //title = "第\(navigationController?.children.count ?? 0)个"
    }
    
    //MARK: 监听方法
    //继续push 一个新的控制器
    @objc private func showNext(){
        let vc = MGDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
        
    }

}

extension MGDemoViewController {
    
    //重写父类方法
//    override func setupTableView() {
//        super.setupTableView()
        
        //设置右侧的控制器
        //navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    //}
    
 
}
